<%@page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="com.weaver.esb.client.EsbClient" %>
<%@ page import="com.weaver.esb.spi.EsbService" %>

<%
    //打印日志
    JSONObject jsonObject = new JSONObject();//可设置返回值
    String eventKey = request.getParameter("eventKey"); //事件标识
    String params = request.getParameter("params"); //事件请求参数

//EsbService其他方法及说明见ESB API接口说明文档
    EsbService service = EsbClient.getService(); //获取 ESB 服务
    String result = service.execute(eventKey, params);
    jsonObject.put("result",result);
%>
<%=jsonObject.toString() %>